package top.yzhao.trackdatasystem.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.yzhao.trackdatasystem.dao.UserDao;
import top.yzhao.trackdatasystem.dto.UserDTO;
import top.yzhao.trackdatasystem.service.UserService;

import java.util.List;

/**
 * User: zhaoyang
 * Date: 2020/3/13
 * Time: 15:09
 * Description: No Description
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public List<UserDTO> getUserList(String query, int currentPage, int pageSize) {
        List<UserDTO> userList = userDao.getUserList(query,(currentPage-1)*pageSize,pageSize);
        return userList;
    }

    @Override
    public int getTotalUserList() {
        return userDao.getTotalUserList();
    }
}
